# PHP docker 官方镜像
# https://hub.docker.com/_/php
FROM php:7.4-fpm

# 扩展安装工具 https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

# 安裝擴展
RUN install-php-extensions gd xdebug

RUN install-php-extensions @composer

ARG PUID=1002
ARG PGID=1002
RUN groupadd -g $PGID apache \
	   && useradd -u $PUID -g apache -m apache

WORKDIR /var/www/html